home *** CD-ROM | disk | FTP | other *** search
- Q32555 Multi-Thread pow Function Fails when Raising Negative Number
- C Compiler
- 5.10 | 5.10
- MS-DOS | OS/2
-
- Summary:
- The pow function in the multi-thread library LLIBCMT.LIB will fail
- when attempting to raise a negative number to a positive integer
- power.
- Microsoft has confirmed this to be a problem in Version 5.10
- of the C compiler. We are researching this problem and will post new
- information as it becomes available.
-
- More Infaormation:
- The following program illustrates this problem:
-
- #include <stdio.h>
- #include <stdlib.h>
-
- void main( void );
- void test( double, double, double );
-
-
- void main()
- {
-
- printf( "Test starting.\n" );
-
- test( -1.0, 2.0, 1.0 );
-
- printf( "Test done.\n" );
-
- }
-
- void test( double x, double y, double answer )
- {
- double z;
-
- z = pow( x, y );
-
- if( z != answer ){
- printf( "Error: pow( %g, %g ) != %g\n", x, y, answer );
- exit( 1 );
- }
- }
-
-
-
- Keywords: buglist5.10 qfbv
- Updated 88/07/21 03:19
-